<template>
    <!-- vue-echarts提供全局组件 -->
    <v-chart :option="getOption()" autoresize></v-chart>
</template>

<script setup lang="ts">
const getOption = () => {
    return {
        xAxis: {
            type: 'category',
            show: false,
        },
        yAxis: {
            show: false,
        },
        series: {
            type: 'line',
            data: props.data,
        }
    }
}

//接受父组件传递过来props
let props = defineProps(["data"]);
</script>

<style scoped>

</style>